package Server;



import java.rmi.*;

/*
 * README
 * Pour lancer le serveur, mettre en arguments de vm : -Djava.security.policy=allpolicy.txt
 * ATTENTION, il faut activer RMIregistry
 */
public class ApplicationServer {

	public static void main(String[] args){
		String ip = "192.168.56.1";

		if(System.getSecurityManager() == null){
			System.setSecurityManager(new RMISecurityManager());
		}
		try{
			Server server = new Server(ip);
			Naming.rebind("///Server", server);
			System.out.println("Objet Server lie");
		}

		catch(Exception e){
			System.out.println("\nProbleme !!\n\n " + e.toString());
			e.printStackTrace();
		}

	}
}
